const getItem = (itemName) => {
  return window.localStorage.getItem(itemName)
}

const setItem = (itemName, itemValue) => {
  return window.localStorage.setItem(itemName, itemValue)
}

const removeItem = (itemName) => {
  return window.localStorage.removeItem(itemName)
}

const clear = () => {
  return window.localStorage.clear()
}

export const getToken = () => getItem('token')

export const setToken = (token) => setItem('token', token)

export const clearToken = () => removeItem('token')

export const clearAll = () => clear()
